<template>
  <div class="container">
    <topTitle :titleText="titleText"></topTitle>
    <div class="mainCon">
      <operateListTab
        @getSelected="getCurrentTabComponent"
        :groupList="groupList"
        style="padding: 0"
      ></operateListTab>
      <keep-alive>
        <component v-bind:is="currentTabComponent"></component>
      </keep-alive>
    </div>
  </div>
</template>

<script>
import operateListTab from '@/components/publicCom/operateListTab'
import networkAllItem from '@/components/bankStatistics/networkAllItem'
import networkStartedItem from '@/components/bankStatistics/networkStartedItem'

export default {
  name: 'networkStatistics',
  components: {
    operateListTab,
    networkAllItem,
    networkStartedItem,
  },
  data() {
    return {
      titleText: '网点统计',
      currentTabComponent: 'networkAllItem',
      groupList: [
        {
          name: '统计全部项目',
          componentName: 'networkAllItem',
        },
        {
          name: '只统计已开工项目',
          componentName: 'networkStartedItem',
        },
      ],
    }
  },
  methods: {
    getCurrentTabComponent(data) {
      this.currentTabComponent = data.componentName
    },
  },
}
</script>

<style scoped lang="less">
.mainCon {
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 24px;
  overflow-y: auto;
}
.topSection {
  height: 67px;
  padding-top: 18px;
  background: #e4ebf1;
  border-radius: 4px 4px 0 0;
  margin: 24px 24px 0px 24px;
  .topBox {
    .projectState {
      display: inline-block;
      width: 60px;
      height: 20px;
      line-height: 20px;
      font-size: 12px;
      color: #fff;
      text-align: center;
      margin-left: 10px;
      font-weight: normal;
      margin-top: 5px;
    }
    /deep/.el-input__inner {
      font: bold 24px Microsoft YaHei;
      color: #333333;
      border: none;
      height: 30px;
      background: #e4ebf1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    /deep/.el-select__caret {
      color: #333;
      font-size: 20px;
      line-height: 30px;
    }
  }
  /deep/.tabs {
    margin-top: 21px;
  }
  /deep/.is-active {
    background: #fff;
  }
}

/deep/.tabsContainer .el-radio-button__inner {
  padding: 0;
  width: 136px;
  height: 36px;
  line-height: 36px;
}
</style>
